#pragma once

#include <ros/message_traits.h>
#include <ros/serialization.h>

#include "Pose2D.pb.h"

namespace ros {

// Begin:ros1_protobuf_msg_bridge::Pose2D
namespace message_traits {
    template <>
    struct MD5Sum<ros1_protobuf_msg_bridge::Pose2D> {
        static const char* value() {
            return "8329a046cd3bbe431f13ce938a7606df";
        }
        static const char* value(ros1_protobuf_msg_bridge::Pose2D const& o) {
            return value();
        }
    };

    template <>
    struct DataType<ros1_protobuf_msg_bridge::Pose2D> {
        static const char* value() {
            return "ros1_protobuf_msg_bridge/Pose2D";
        }
        static const char* value(ros1_protobuf_msg_bridge::Pose2D const& o) {
            return value();
        }
    };

    template <>
    struct Definition<ros1_protobuf_msg_bridge::Pose2D> {
        static const char* value() {
            return "ros1_protobuf_msg_bridge/Pose2D";
        }
        static const char* value(ros1_protobuf_msg_bridge::Pose2D const& o) {
            return value();
        }
    };
}  // namespace message_traits

namespace serialization {
    template <>
    struct Serializer<ros1_protobuf_msg_bridge::Pose2D> {
        template <typename Stream>
        inline static void write(Stream& stream, ros1_protobuf_msg_bridge::Pose2D const& o) {
            std::string ser_bytes;
            if (!o.SerializeToString(&ser_bytes)) {
                std::cerr << "Serialization failed[ros1_protobuf_msg_bridge::Pose2D]" << std::endl;
                return;
            }
            memcpy(stream.advance(ser_bytes.size()), ser_bytes.c_str(), ser_bytes.size());
        }

        template <typename Stream>
        inline static void read(Stream &stream, ros1_protobuf_msg_bridge::Pose2D &o) {
            std::string deser_bytes;
            deser_bytes.resize(stream.getLength());
            memcpy(&deser_bytes[0], stream.advance(stream.getLength()),stream.getLength());
            if (!o.ParseFromString(deser_bytes)) {
                std::cerr << "Deserialization failed[ros1_protobuf_msg_bridge::Pose2D]" << std::endl;
                return;
            }
        }

        inline static uint32_t
        serializedLength(ros1_protobuf_msg_bridge::Pose2D const &o) {
            return o.ByteSizeLong();
        }
    };
}  // namespace serialization
// End:ros1_protobuf_msg_bridge::Pose2D

}  // namespace ros


namespace ros1_protobuf_msg_bridge{
    typedef boost::shared_ptr< ::ros1_protobuf_msg_bridge::Pose2D > Pose2DPtr;
    typedef boost::shared_ptr< ::ros1_protobuf_msg_bridge::Pose2D const> Pose2DConstPtr;
}